-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: Plateform Icon And Text #4713
Conversation
} | ||
|
||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems to have no issues in terms of structure, syntax, or function flow as it stands currently. The main areas where potential improvements could be made relate to using CSS instead of plain HTML.
Optimizing:
- Move some common utility classes (e.g., platform-name) directly into the style block at the end, rather than creating them inline within an instance of .icon-zone. This will make stylesheets cleaner and more maintainable.
css
@import '~fontawesome/scss';
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.platform-td {
transition: all 0.2s cubic-bezier(0.25, 0.35, 0.25, 1);
/* add fade-in animation only when hovered */
&:hover:not([data-disabled]),
&[class*('_active_')],
*[data-focus-visible] {
transform: scale(1.1);
color: #f7b28c;
// Add this to apply the animation only on hover over certain elements
&::after,
&[data-disabled][&*~._focus-visible]:not([aria-label^='')] {
content: "";
position: absolute;
z-index: 9;
top: 1px;
right: 1px;
bottom: 1px;
left: 1px;
background-color: rgba(140,140,160,.2)
To sum up, if I were making changes for you based on these optimizations, the updated script might look something like this:
<script src="https://unpkg.com/@fortawesome/free-brands-js">...</script>@@-158,15 +162,11 @@
<style scoped lang="scss" v-loading-prevention> body { margin-top: 0!important; } @media screen and (max-width: 1024px) { .content-table > :last-child:first-of-type { order-position: first !important ```@@ -139,6 +139,7 @@ export function getDefaultConfig(vm) { | |||
sortable: true | |||
}, | |||
platform: { | |||
width: '160px', | |||
sortable: true, | |||
formatter: PlatformFormatter | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main difference between the two lines of code is in the line with the curly braces {}
instead of {width}
, which changes the value of <
"platform.width"`. To optimize the readability and maintainability of the code:
export function getDefaultConfig(vm) {
// Here's the rest of your existing functionality...
}
This change might not have an impact on regular operations but could improve style slightly. It's generally advisable to ensure consistency in naming conventions (e.g., height
, width
) since it makes files easier to read and understand.
If you want further optimizations, let me know!
|
Fixed: Plateform Icon And Text